<template>
	<view class="login flex flex-c" :style="{paddingTop:statusBarHeight}">
		<image
			src="../../assets/images/login/bg.png"
			mode="scaleToFill"
			class="bg"
		/>
		<view class="logo flex flex-c flex-a-c">
			<image
				src="../../assets/images/logo.png"
				class="logo-pic"
			/>
			<view class="slogen c-90 bold">剧多分欢迎你~</view>
		</view>
		<Login @register="()=>type=2" v-if="type==1" />
		<Register @login="()=>type=1" v-else />
	</view>
</template>

<script>
	import Login from './components/login'
	import Register from './components/register'
	import {statusBarHeight} from '../../assets/utils/config.js'
	export default{
		components:{
			Login,
			Register
		},
		data(){
			return{
				type:1,//1登录2注册
				statusBarHeight,
			}
		},
		methods:{
			
		}
	}
</script>

<style lang="less" scoped>
	@import url('../../assets/styles/common.less');
	.login{
		width: 100%;
		height: 100vh;
		overflow-y: hidden;
		box-sizing: border-box;
		background: linear-gradient( 180deg, #7493FF 0%, #F7F8FF 248px);
		// background-color: aquamarine;
		.bg{
			position: fixed;
			top:0;
			width: 100%;
			// height: 280rpx;
			user-select: none;
			pointer-events: none;
		}
		.logo-pic{
			width: 128rpx;
			height: 128rpx;
			margin-top: 210rpx;
		}
		.slogen{
			font-size: 48rpx;
			margin-top:24rpx;
			margin-bottom:64rpx;
		}
	}
</style>